package com.yunban.project.message.controller;

import com.yunban.project.message.dto.TrialApplicationReq;
import com.yunban.project.message.service.TrialApplicationRecordService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import net.lab1024.sa.base.common.annoation.NoNeedLogin;
import net.lab1024.sa.base.module.support.operatelog.annotation.OperateLog;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

/**
 * @author: lijiajun
 * @date: 2025-03-07
 * @version: 1.0
 */
@OperateLog
@RestController
@Tag(name = "提交申请模块")
@RequestMapping("/trial-application-api")
public class TrialApplicationController {

    @Resource
    private TrialApplicationRecordService trialApplicationRecordService;

    @NoNeedLogin
    @PostMapping("/info")
    @Operation(summary = "提交试用申请")
    public Boolean postTrialApplication(@RequestBody @Validated TrialApplicationReq req) {
        return trialApplicationRecordService.postTrialApplication(req);
    }
}
